feat(discovery): add more info for renamed items
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Tue, 22 Apr 2025 14:03:29 +0000 (16:03 +0200)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Thu, 24 Apr 2025 09:51:24 +0000 (11:51 +0200)
add original name
add renamed name
add target name

should make it easier to analyze rename operations

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/syncfilestatustracker.cpp

index d1ee8a06f3a963e79847de4a118736739c9fdbba..d671389414dab179b4d20e68db09f75d79829ba6 100644 (file)
@@ -236,7 +236,11 @@ void SyncFileStatusTracker::slotAboutToPropagate(SyncFileItemVector &items)
     std::swap(_syncProblems, oldProblems);
 
     for (const auto &item : std::as_const(items)) {
-        qCInfo(lcStatusTracker) << "Investigating" << item->destination() << item->_status << item->_instruction << item->_direction;
+        if (item->_instruction == CSyncEnums::CSYNC_INSTRUCTION_RENAME) {
+            qCInfo(lcStatusTracker) << "Investigating" << item->destination() << item->_status << item->_instruction << item->_direction << item->_file << item->_originalFile << item->_renameTarget;
+        } else {
+            qCInfo(lcStatusTracker) << "Investigating" << item->destination() << item->_status << item->_instruction << item->_direction;
+        }
         _dirtyPaths.remove(item->destination());
 
         if (hasErrorStatus(*item)) {